Current Location: Home> Function Categories> decoct

decoct

Convert decimal to octal
Name:decoct
Category:math
Programming Language:php
One-line Description:Convert decimal to octal.

Definition and usage

decoct() function converts decimal to octal.

Example

 <?php
echo decoct ( "30" ) ;
echo decoct ( "10" ) ;
echo decoct ( "1587" ) ;
echo decoct ( "70" ) ;
?>

Try it yourself

grammar

 decoct ( dec_number )
parameter describe
dec_number Required. Specifies the decimal number to be converted.

illustrate

Returns a string containing an octal representation of the given dec_number parameter. The maximum value that can be converted is 4294967295 in decimal, and the result is "3777777777777".

Similar Functions
  • Generate a random integer rand

    rand

    Generatearandominteg
  • Find the maximum value max

    max

    Findthemaximumvalue
  • Returns the remainder of the floating point number of division fmod

    fmod

    Returnstheremaindero
  • Sine sin

    sin

    Sine
  • Calculate the index of e exp

    exp

    Calculatetheindexofe
  • Calculate the oblique length of a straight triangle hypot

    hypot

    Calculatetheobliquel
  • Returns log(1 + number), and can calculate the exact result even when the value of number is close to zero. log1p

    log1p

    Returnslog(1+number)
  • Anyway atan

    atan

    Anyway
Popular Articles